<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<?php 
	$url = $this->baseurl.'/images/com_retailshop/';	
	$caregory = '';
	/*for($i = 0 ; $i < count($this->catagorys_Menu); $i++){
		if($i!=3)
			$caregory .= '<li><a href="index.php?option=com_retailshop&view=home&task=detailscatelog&id='.$this->catagorys_Menu[$i]->id.'">'.$this->catagorys_Menu[$i]->name.'</a></li>';
		else{
			$caregory .= '<li class="last"><a href="index.php?option=com_retailshop&view=home&task=detailscatelog&id='.$this->catagorys_Menu[$i]->id.'">'.$this->catagorys_Menu[$i]->name.'</a></li>';
			break;
		}
	}*/
?>		
   <div id="main">
	  <div class="wrapper wpmain">
			<div id="main-premium">
				<div class="events">
					<h4>List All Events</h4>
					<div id="list-all-events" class="blockwhite">
						<ul>
                        <?php foreach($this->events as $event): ?>
							<li>
								<span><?php echo $event->title; ?> </span>
								<br/><span class="from">From: </span><span class="start-date"><?php echo $event->start_date; ?></span> - <span class="to">To: </span><span class="end-date"><?php echo $event->end_date; ?></span>
							</li>
                        <?php endforeach; ?>
						</ul>
					</div>
				</div>
			</div>
            
			<div id="main-search">
				<?php echo $this->loadTemplate('left');?>		                        
			</div>
		</div>      
    </div>
    <script type="text/javascript">
    $(window).load(function() {
		$('#sub-nav ul').html('<?php echo $caregory; ?>');
    });
    </script>